package com.igeek.bean;
import java.time.LocalDate;
import java.util.Date;

public class Car {
    private int carid;
    private double out;
    private LocalDate time;
    private double price;
    private int distance;
    public Car(){}
    public void setDistance(int distance) {
        this.distance = distance;
    }

    public int getDistance() {
        return distance;
    }

    private String ltype;

    public Car(int carid,int brandid, int cartypeid) {
        this.carid = carid;
        this.brandid = brandid;
        this.cartypeid = cartypeid;
    }

    private LocalDate puttime;
    private int brandid;
    private int cartypeid;

    public void setCarid(int carid) {
        this.carid = carid;
    }

    public void setOut(double out) {
        this.out = out;
    }



    public void setPrice(double price) {
        this.price = price;
    }

    public void setLtype(String ltype) {
        this.ltype = ltype;
    }

    public void setPuttime(LocalDate puttime) {
        this.puttime = puttime;
    }

    public void setBrandid(int brandid) {
        this.brandid = brandid;
    }

    public void setCartypeid(int cartypeid) {
        this.cartypeid = cartypeid;
    }

    public int getCarid() {
        return carid;
    }

    public double getOut() {
        return out;
    }

    public Car(int carid, double out, LocalDate time, double price, int distance, String ltype, LocalDate puttime, int brandid, int cartypeid) {
        this.carid = carid;
        this.out = out;
        this.time = time;
        this.price = price;
        this.distance = distance;
        this.ltype = ltype;
        this.puttime = puttime;
        this.brandid = brandid;
        this.cartypeid = cartypeid;
    }

    public double getPrice() {
        return price;
    }

    public String getLtype() {
        return ltype;
    }

    public LocalDate getPuttime() {
        return puttime;
    }

    public int getBrandid() {
        return brandid;
    }

    public int getCartypeid() {
        return cartypeid;
    }

    @Override
    public String toString() {
        return
                "车辆编号" + carid +
                ", 排量" + out +
                ", 上牌时间" + time +
                ", 价格为" + price +
                ", 里程数为" + distance +
                ", 离合器类型为'" + ltype + '\'' +
                ", 上架时间为'" + puttime + '\'' +
                ", 品牌编号为" + brandid +
                ", 车型编号为" + cartypeid ;
    }

    public void setTime(LocalDate time) {
        this.time = time;
    }

    public LocalDate getTime() {
        return time;
    }
}
